home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / pini10 / form1.frm < prev    next >
Text File  |  1995-01-07  |  3KB  |  116 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3840
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7305
  8.    Height          =   4245
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3840
  12.    ScaleWidth      =   7305
  13.    Top             =   1140
  14.    Width           =   7425
  15.    Begin CommandButton Command2 
  16.       Cancel          =   -1  'True
  17.       Caption         =   "Cancel"
  18.       Height          =   420
  19.       Left            =   3780
  20.       TabIndex        =   4
  21.       Top             =   3240
  22.       Width           =   1770
  23.    End
  24.    Begin CommandButton Command1 
  25.       Caption         =   "Write WIN.INI"
  26.       Height          =   420
  27.       Left            =   1350
  28.       TabIndex        =   1
  29.       Top             =   3240
  30.       Width           =   1770
  31.    End
  32.    Begin Label Label6 
  33.       BackStyle       =   0  'Transparent
  34.       Caption         =   "Testing=1...2...3..."
  35.       ForeColor       =   &H00FF0000&
  36.       Height          =   285
  37.       Left            =   540
  38.       TabIndex        =   7
  39.       Top             =   2430
  40.       Width           =   1770
  41.    End
  42.    Begin Label Label5 
  43.       BackStyle       =   0  'Transparent
  44.       Caption         =   "[PINI]"
  45.       ForeColor       =   &H00FF0000&
  46.       Height          =   285
  47.       Left            =   540
  48.       TabIndex        =   6
  49.       Top             =   2160
  50.       Width           =   1770
  51.    End
  52.    Begin Label Label4 
  53.       BackStyle       =   0  'Transparent
  54.       Caption         =   "Clicking on the ""Write WIN.INI"" button will write a new section called ""[PINI]"" in your WIN.INI file.  It will look like this:"
  55.       Height          =   420
  56.       Left            =   270
  57.       TabIndex        =   5
  58.       Top             =   1485
  59.       Width           =   6765
  60.    End
  61.    Begin Label Label2 
  62.       BackStyle       =   0  'Transparent
  63.       Caption         =   "Device="
  64.       ForeColor       =   &H00FF0000&
  65.       Height          =   285
  66.       Left            =   540
  67.       TabIndex        =   3
  68.       Top             =   1080
  69.       Width           =   825
  70.    End
  71.    Begin Label Label1 
  72.       BackStyle       =   0  'Transparent
  73.       Caption         =   "The following is found as the ""Device"" entry under the ""[Windows]"" section in the WIN.INI file.  Only one line of code is necessary to read or write to any INI file using PINI.BAS!"
  74.       Height          =   690
  75.       Left            =   270
  76.       TabIndex        =   2
  77.       Top             =   270
  78.       Width           =   6765
  79.    End
  80.    Begin Label Label3 
  81.       BackColor       =   &H00FF0000&
  82.       BackStyle       =   0  'Transparent
  83.       Caption         =   "ReadPINIString(""WIN.INI"",""Windows"",""Device"")"
  84.       ForeColor       =   &H00FF0000&
  85.       Height          =   285
  86.       Left            =   1350
  87.       TabIndex        =   0
  88.       Top             =   1080
  89.       Width           =   5415
  90.    End
  91. End
  92. Option Explicit
  93.  
  94. Sub Command1_Click ()
  95.  
  96.     If WritePINIString("WIN.INI", "PINI", "Testing", "1...2...3...") Then
  97.         MsgBox ("Write successfull!")
  98.     Else
  99.         MsgBox ("Write NOT successfull!")
  100.     End If
  101.  
  102. End Sub
  103.  
  104. Sub Command2_Click ()
  105.  
  106.     End
  107.  
  108. End Sub
  109.  
  110. Sub Form_Load ()
  111.  
  112.     Label3.Caption = ReadPINIString("WIN.INI", "Windows", "Device")
  113.     
  114. End Sub
  115.  
  116.